
#ifndef OSNET_PROC_H
#define OSNET_PROC_H

#include <string>
#include <vector>
#include <opencv2/opencv.hpp>

 #include <tracking/src/networkfunc.h>

//class NetworkFeatExtract{
//public:
//    NetworkFeatExtract(){};
//    virtual int init(std::string weights){};
//    virtual std::vector<std::vector<float>> extract(std::vector<cv::Mat> & img)=0;
//    ~NetworkFeatExtract(){};
//protected:
//    void *handle;
//};

class OsnetREID : public NetworkFeatExtract{
public:
    OsnetREID(int device_id, int max_batch_size, uint8_t dataType, cv::Size size, bool use_dynamic, bool alway_serialize, bool preprocess):
    device_id(device_id), max_batch_size(max_batch_size), dataType(dataType), size(size), use_dynamic(use_dynamic),
    alway_serialize(alway_serialize), preprocess(preprocess) { handle=nullptr;};

    virtual int init(const std::string& weight_path);
    virtual std::vector<std::vector<float>> extract(std::vector<cv::Mat> & img);
    virtual ~OsnetREID();

private:
    int device_id;
    int max_batch_size;
    cv::Size size;
    bool use_dynamic, alway_serialize;
    uint8_t dataType;
    bool preprocess;
};

#endif #OSNET_PROC_H